import { mapState } from "vuex"
import xxlHintVue from "../components/xxl-hint/xxl-hint.vue"
export default {
    computed: {
        ...mapState(['header', 'user'])
    },
    mounted() {

    },
    methods: {
        img(d) {
            return "/static/img/" + d
        },
        head(d) { return d },
        moneyFormat(money) {
            let arr = money.toString().split('.')
            if (arr.length == 1) {
                money = money + '.00'
            }
            else if (arr.length == 2) {
                if (arr[1].length < 2) {
                    arr[1] = arr[1] + '0'
                    money = arr.join(".")
                }else{
                    arr[1] = arr[1].slice(0,2)
                    money = arr.join(".")
                }
            }
            return money
        }
    },
    components: {
        xxlHintVue
    }
}